package thread;
import java.util.Timer;
import java.util.TimerTask;

public class Timer_ {
    public static void main(String[] args) {

        Timer timer = new Timer();
        // (任务,多久执行)
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("hello,timer");
            }
        }, 10000);
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("hello,timer");
            }
        }, 15000);
        System.out.println("main");
    }
}
